import {lazy} from "react";
import {Navigate} from "react-router-dom";


const AnnouncementList = lazy(() => import("./AnnouncementList"))
const AddAnnouncement = lazy(() => import("./AddAnnouncement"))
const AnnouncementDetails = lazy(() => import("./AnnouncementDetails"))


export default [
  // 主页面路由
  {
    path: "/main/announcement", children: [
      {path: "/main/announcement", element: <Navigate replace to="/main/announcement/announcementList"/>},
      {path: "/main/announcement/announcementList", element: <AnnouncementList/>},
      {path: "/main/announcement/addAnnouncement", element: <AddAnnouncement/>},
      {path: "/main/announcement/announcementDetails", element: <AnnouncementDetails/>},
    ]
  },
]